package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.ArticleComment;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ArticleCommentMapper {
    int deleteByPrimaryKey(Long id);
    //删除关系,评论和游记
    void deleteTravelRelationship(Long articleCommentId);
    //删除关系,评论和攻略
    void deleteStrategyRelationship(Long articleCommentId);
    //删除关系,评论和酒店
    void deleteHotelRelationship(Long articleCommentId);
    //删除关系,评论和日报
    void deleteDailyRelationship(Long articleCommentId);


    int insert(ArticleComment record);
    //添加关系,评论和游记
    void insertTravelRelationship(@Param("articleCommentId") Long articleCommentId, @Param("travelId") Long travelId, @Param("createTime") Date date);
    //添加关系,评论和攻略
    void insertStrategyRelationship(@Param("articleCommentId") Long articleCommentId, @Param("strategyId") Long strategyId);
    //添加关系,评论和酒店
    void insertHotelRelationship(@Param("articleCommentId") Long articleCommentId, @Param("hotelId") Long hotelId);
    //添加关系,评论和日报
    void insertDailyRelationship(@Param("articleCommentId") Long articleCommentId, @Param("dailyId") Long dailyId);

    ArticleComment selectByPrimaryKey(Long id);

    //查询游记的游记评论列表
    List<ArticleComment> selectForTravelCommentsList(@Param("qo") QueryObject qo, @Param("travelId") Long travelId);
    //查询游记的攻略评论列表
    List<ArticleComment> selectForStrategyCommentsList(@Param("qo") QueryObject qo,  @Param("strategyId") Long travelId);
    //查询游记的酒店评论列表
    List<ArticleComment> selectForHotelCommentsList(@Param("qo") QueryObject qo, @Param("hotelId") Long travelId);
    //查询游记的日报评论列表
    List<ArticleComment> selectForDailyCommentsList(@Param("qo") QueryObject qo,  @Param("dailyId") Long travelId);



}